<style>
.webboard-button{padding:10px 0;}
.webboard-list tr.group th{background:#a6c1d2;}
.webboard-list tr.head th{padding:2px 5px;}
.pagination{float:right;}
.webboard-list{width:100%;}
.webboard-list tr th{padding:10px 5px;text-align:left;font-size:12px;font-weight:bold;background:#E5EDF2;}
.webboard-list tr td{padding:10px 5px;border:1px solid #ccc;vertical-align:middle;}
.webboard-list tr td a{color:#484848; font-weight:bold;} 
.webboard-list .small{width:90px;font-size:12px; text-align:center;}
.text-info{color:#888;font-size:11px;}
a:link.edit,a:visited.edit{color:green;font-size:13px;}
a:link.delete,a:visited.delete{color:red;font-size:13px;}
.description{color:#999; font-size:11px; padding:3px 0;}
</style>
<div id="breadcrumb"><ul><li><a href="">หน้าแรก</a></li><span>»</span><li><a href="webboard">เว็บบอร์ด</a></li></ul><div class="clear"></div></div>
	<div id="content-data" class="box">
		<div id="module-webboard" class="view" >
			<table class="webboard-list">
				
				
			
				<?php foreach($categories as $category): ?>
				<tr>
					<td><?php echo anchor('webboard/topics/index/'.$category->id,'<img src="media/images/comment_reply.png" />')?></td>
					<td class="title">
						<?php echo anchor('webboard/topics/index/'.$category->id,$category->name)?>
						<div class="description">
							<?php echo nl2br($category->description) ?>
						</div>
					</td>
					<td class="small">
						<?php echo $category->topic->where('topic_id <',1)->count() ?> กระทู้<br/>
						<?php 
							$reply = new Post;
							echo $reply->where_related_topic('webboard_category_id',$category->id)->count();
						?> ตอบ
					</td>
					<td class="small">
						กระทู้ล่าสุด<br />
						<br />
						โดย
					</td>
				</tr>
				<?php endforeach;?>
				
			</table>
		</div>
		<div class="clear"></div>
	</div>
